<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加公告</title>
</head>
<body>
	<center>
		<div>
		<div>
			<h3>添加公告</h3>
			<script type="text/javascript">
				eval("${msg}");
			</script>
			<form action="${pageContext.request.contextPath }/ntOpt"
				method="post">
				<div>
					<lable form="name">标题：</lable>
					<input type="text" name="title" id="titles">
				</div>
				<div>
					<lable form="cardid">内容：</lable>
					<input type="text" name="content" id="contents">
				</div>
				<br>
				<div>
					<input type="submit" value="提交" onclick="return checkSubmit()">
				</div>
			</form>
		</div>
	</div>
	</center>
	
	<script type="text/javascript">
    function checkSubmit() {
      var otitles = document.getElementById("titles");
      var ocontents = document.getElementById("contents");
      var uerror = "";

      if (titles.value.length < 4 || titles.value.length > 100 || contents.value.length < 4 || contents.value.length > 100) {
        alert("输入不能为空，且长度不超过4-100字符");
        return false;
      }
      return true;
    }
  </script>
</body>
</html>